package main

import "fmt"

type Human struct {
	name string
}

func (this *Human) walk() {
	fmt.Println("Human walk")
}

func (this *Human) say() {
	fmt.Println("My name is", this.name)
}

type SuperMan struct {
	Human
	age int
}

func (this *SuperMan) fly() {
	fmt.Println("SuperMan fly")
}

func (this *SuperMan) say() {
	fmt.Println("I am SuperMan")
}

func main() {
	human := Human{"lisi"}
	human.walk()
	human.say()

	superMan := SuperMan{Human{"shimisi"}, 30}
	superMan.fly()
	superMan.walk()
	superMan.say()
}
